import cv2
import numpy as np
image=cv2.imread('weiqi.png')
cv2.imshow("Input",image)
img_copy=image.copy()
blur_copy=cv2.medianBlur(img_copy,5)
gray=cv2.cvtColor(blur_copy,cv2.COLOR_BGR2GRAY)
circles=cv2.HoughCircles(gray,cv2.HOUGH_GRADIENT,1,70,param1=100,param2=25,minRadius=10,maxRadius=50)
circles=np.uint(np.around(circles))
for c in circles[0]:
	x,y,r=c
	cv2.circle(image,(x,y),r,(255,0,0),3)
	cv2.circle(image,(x,y),2,(0,0,255),3)
cv2.imshow("HoughCircles",image)
cv2.waitKey()
cv2.destroyAllWindows()